package com.sc.nft.dao;



import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.entity.MallActivityRanking;
import com.sc.nft.mapper.MallActivityRankingMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;


/**
 * IP商城活动兑换配置表(sc_mall_activity_exchange)数据DAO
 *
 * @author zxy
 * @since 2023-05-10 16:59:01
 * @description IP商城
 */
@Slf4j
@Repository
public class MallActivityRankingDao extends ServiceImpl<MallActivityRankingMapper, MallActivityRanking> {

    public MallActivityRanking getMallActivityRanking() {
        LambdaQueryWrapper<MallActivityRanking> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(MallActivityRanking::getStatus, true);
        wrapper.last("limit 1");
       return getOne(wrapper);
    }
}